home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / hypercrd / xcmds / dvlprstc.hqx / Developer Stack 1.3r / card_38980.txt < prev    next >
Encoding:
Text File  |  1991-04-30  |  1.0 KB  |  52 lines

  1. -- card: 38980 from stack: in.3r
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 3837
  5. -- name: FileExists
  6.  
  7.  
  8. -- part contents for background part 10
  9. ----- text -----
  10. 50
  11.  
  12. -- part contents for background part 5
  13. ----- text -----
  14. FileExists
  15.  
  16. -- part contents for background part 6
  17. ----- text -----
  18. Opening a stack or file with HyperTalk carries the risk of invoking an annoying "Where is" dialog. This XFCN allows you to test if a file exists before opening it.
  19.  
  20. This XFCN may be freely used in your own stacks provided you credit me, Guy Kuo in your aboutΓǪ documentation.
  21.  
  22. Guy Kuo
  23. UNSOM
  24. GEnie: G.KUO
  25. August 22, 1988
  26.  
  27.  
  28.  
  29. -- part contents for background part 27
  30. ----- text -----
  31. XFCN
  32.  
  33. -- part contents for background part 7
  34. ----- text -----
  35. Syntax:
  36.  
  37.     FileExists(fileName)
  38.  
  39.     returns: TRUE if file exists
  40.                     FALSE if it doesn't
  41.  
  42.     fileName is an expression
  43.     which is a pathname of a file.
  44.  
  45. Example:
  46.  
  47. If FileExists("myDrive:folder:subfolder:fileName) then
  48.     -- go ahead and open it
  49. else
  50.     -- your own error handler for missing files
  51. end if
  52.